#!/bin/bash
# This script will return 0 if dates do not match
# 0 = fail
# Else the time difference in seconds is returned
# Then using something like Zabbix the trigger can be set based on the returned difference or if it's 0
# Get current date in fullyear-month-day ie 2011-04-25
currentDate=$(date +%m-%Y)
# Get current time in 24-hour, minutes, seconds ie 20:15:30
currentTime=$(date +%H:%M:%S)
# Initalize datesMatch, assume they match
datesMatch="true"


# compare dates and return false if they do not match
# a false indicates the last run has not run as scheduled

# If dates do not match then assume lastrun is overdue
echo $currentDate
if [ $currentDate == "09-2014" ]
then
	echo $currentDate
	exit 1
fi

if [ $currentDate == "12-2014" ]
then
	echo $currentDate
	exit 1 
fi

exit 0
